begintalkscript;

variables;
 
 
begintalknode 1;
 state = -1;
 
nextstate = 1;
 personality = 1;
  question = "Mayor Rupp";
 text1 = "Mayor Rupp appears to look scared after what looked like an attempted assasination. However, something seems off.";
 text2 = "_Do you need anything?_";
 text5 = "Mayor Rupp is mindlessly messing with his papers when he notices you. _Do you need anything?_";
 
action = INTRO;
 
begintalknode 2;
 state = 1;
 nextstate = 1;
 condition = (get_flag(50,11) == 0);
 question = "Are you okay?";
 text1 = "_Yes, I'm fine. Don't ask about the assassination, because I don't know anything. Anyway, I need you to do something. I can give pay._";
 text2 = "What an odd thing to say after all that.";
 code = set_flag(50,11,1);
 break;
 
begintalknode 3;
 state = 1;
 nextstate = 1;
 condition = (get_flag(50,11) == 1);
 question = "So you wanted me to do something?";
 text1 = "_Yes. Go to the mine east of town. Look around. Go._";
 code = toggle_quest(0,1);
 set_flag(50,11,2);
 break;
 
begintalknode 4;
 state = 1;
 nextstate = 1;
 condition = (get_flag(50,11) == 2);
 question = "Why direct me to the mine?";
 
text1 = "_Go to the mine._";
 
text2 = "What is with this guy?";
 
begintalknode 5;
 state = 1;
 nextstate = 2;
 condition = (get_flag(50,11) == 2);
 question = "How is the town?";
 text1 = "_The mine is safe. You can go in there._";
 
begintalknode 6;
 state = 2;
 
nextstate = 1;
 question = "Are you going to answer it correctly?";
 text1 = "_I told you, the mine is safe. Go in there and look around._";
 text2 = "What the hell is wrong with this guy?";
 
begintalknode 7;
 state = 1;
 nextstate = -1;
  condition = (get_flag(0,18) == 4);
 question = "Die Darkling!";
 text1 = "Mayor Rupp, the Darkling, smirks. He transforms into his Darkling form and attacks.";
 code = erase_char(22);
 activate_hidden_group(2);
 clear_quest(0);
 break;
  action = END_TALK;
  
begintalknode 8;
 state = -1;
 nextstate = 3;
 personality = 2;
  question = "Captain Rupp";
 text1 = "The captain hasn't eaten in days. He also smells. _Before we can talk, I at least need some food._";
 text5 = "The captain plays with the paper when he notices you. _Do you need new orders?_";
 action = INTRO;
 
begintalknode 9;
 state = 3;
 
nextstate = 3;
 personality = 2;
 condition = (get_flag(0,21) == 0);
 question = "What happened to you?";
 text1 = "After you give him food, he talks. _Well, a few months ago, there was an election for mayor. At first, there were only three running for mayor._";
 
text2 = "_Then this strange guy walked up to me. I introduced myself and asked for his name. He said 'Nifus Rupp', which is my name by the way. It was strange, but I shrugged and moved on._";
 
text3 = "_About a week later, he ran for mayor. In about a month, all of other candidates have suffered accidents, though I'm sure they were intentional._";
 
text4 = "_Eventually, there was no choice. That strange dude was mayor._";
 
text5 = "_About one month ago, he locked me in here. He gave me food every night...just enough so that I wouldn't starve. He forgot about me a few days ago._";
 
text6 = "_If you hadn't come, I'd have starved._";
 code = set_flag(0,21,1);
 break;
 
begintalknode 10;
 state = 3;
 
nextstate = 3;
 personality = 2;
 condition = ((get_flag(0,21) == 1) && (get_flag(0,22) == 0));
 question = "So what can I do?";
 text1 = "He hands you a thin metal plate with writing on it. _There is a stone circle somewhere to the southwest. It is guarded, and I just gave you a permission slip._";
 text2 = "_Talk to the wizard, then report to me. He might have important information._";
 code = set_flag(0,22,1);
 
change_spec_item(3,1);
 
toggle_quest(1,1);
  break;
 
begintalknode 11;
 state = 3;
 nextstate = -1;
 condition = (get_flag(0,22) == 5);
 question = "I have talked with Sikitho";
 text1 = "The captain reaches into his desk and pulls out an orb. _You will need this to stabalize unstable portals. Now the wizard Sikitho is the one you need to report to._";
 code = change_spec_item(4,1);
 
clear_quest(1);
 
set_flag(0,22,6);
 break;
 
begintalknode 12;
 state = 3;
 
nextstate = -1;
 condition = (get_flag(0,21) == 1);
 
question = "How is the town?";
 
text1 = "_Good. There was a misshap with a building, but overall good. Though the whole end-of-the-world stuff is annoying..._";
 
begintalknode 13;
 state = -1;
 
nextstate = 4;
 question = "Wizard";
 text1 = "At first you think you see a normal wizard. Then the wizard turns around, foaming at the mouth.";
 
text2 = "He screams something incomprehesible, then he takes off his robe and runs around screaming and nude.";
 
text3 = "The guards sigh and run over to him to calm him down and, of course, put his robe back on him. Odd.";
 
text5 = "The wizard is still going around psycotically.";
 
action = INTRO;
 
code = set_flag(5,10,1);
 break;
 
begintalknode 14;
 state = 4;
 
nextstate = -1;
 question = "What's wrong?";
 
text1 = "He drools and holds out his hands as if he was expection to be fed. When you don't feed him, he jumps, growls, and barks at you.";
 
text2 = "He then apparently forgets about what he does and chases the end of his robe.";
 
begintalknode 15;
 state = 4;
 
nextstate = -1;
 question = "Idiot";
 text1 = "The wizard's answer is taking a carrot out of his robe. He then precedes to eat it and cries when he sets it on fire.";
 
text2 = "He then throws it and your hair catches on fire. You manage to put it out, thankfully. Ouch.";
 
begintalknode 16;
 state = 3;
 nextstate = -1;
 condition = ((get_flag(0,21) == 1) && (get_flag(5,10) == 1));
 
question = "Who is that psychopathis wizard?";
 
text1 = "_He started going crazy when the whole mess started. I doubt it's a coincidence. Poor fellow._";
 
text2 = "_I don't know why we haven't locked him up. He could hurt someone. I'll go order the guards to lock him up._";
 code = erase_char(34);
 activate_hidden_group(3);
 
set_terrain(27,7,28);
 break;
 
begintalknode 17;
 state = -1;
 
nextstate = -1;
 question = "Wizard";
 text1 = "The psychotic wizard dances around an apple in his cell. He has a frowny face.";
 
begintalknode 18;
 state = -1;
 nextstate = 5;
 question = "Dude";
 text1 = "A kid, probably around ten years of age, is wandering around with the face of a kid who is just plain bored.";
 
text2 = "When he notices you noticing him, he jumps up excitedly. _Cool! Adventurers! Awesome!_ This continues on.";
 
text5 = "Once again the kid gets really excited over you being here.";
 
action = INTRO;
 
begintalknode 19;
 state = 5;
 nextstate = -1;
 question = "Hello, kid";
 
text1 = "_Hi! Ooh! Shiny stabby thingies! May I play with them?!_
You shake your head no. He looks sad, then spasmatically starts talking about random things.";
 
begintalknode 20;
 state = 5;
 
nextstate = -1;
 question = "Where is your daddy?";
 
text1 = "He points down. _My mommy says he is down with the muffins. Whatever that means._";
 
begintalknode 21;
 state = 5;
 nextstate = 6;
 question = "Where is your mommy?";
 
text1 = "_In the bar thing. She acts funny sometimes. I can even walk better than she can!_ Great. A kid with an alchoholic mother.";
 
text2 = "_Hey guess what?_";
 
begintalknode 22;
 state = 6;
 nextstate = -1;
 question = "What?";
 
text1 = "_I wanna be like my mommy someday because that is what a lot of kids where I used to be wanted to be._";
 
text2 = "_So I'm going to dig a bunch of shiny stuff and drink something called licker, or something like that._";
 
begintalknode 23;
 state = -1;
 
nextstate = -1;
 question = "Drunk";
 text1 = "The lady here is apparently extremely drunk. You can't even get any response from her. She eventually falls asleep.";
 
text5 = "The lady is still drunk and far too away to answer anything you could possibly ask.";
 action = INTRO;
 
begintalknode 24;
 state = -1;
 nextstate = 7;
 question = "Innkeeper";
 text1 = "When you greet the innkeeper, he grins.";
 text2 = "_What will it be?_";
 
begintalknode 25;
 state = 7;
 nextstate = 8;
 question = "Do you have a room?";
 text1 = "_Yes I do! If fact, it only costs ten coins! Do you want to stay the night here?_";
 
begintalknode 25;
 state = 8;
 nextstate = -1;
 question = "No, nevermind";
 text1 = "The innkeeper hides his dissapointment and shrugs. _Oh well._";
 
begintalknode 26;
 state = 8;
 nextstate = -1;
 question = "Show us to the room!";
 text1 = "After you pay the ten coins, he shows you to your room.";
 text3 = "You don't even have ten coins. The innkeeper raises his right eyebrown.";
 text4 = "_You've been a bit too spend happy. You're adventurers, you should at least have ten coins!_";
 
text5 = "_Well, get off your horses first!_";
 
action = INN 10 40 40;
 
begintalknode 27;
 state = 7;
 nextstate = -1;
 question = "Have anything to drink?";
 text1 = "_Not right now. Someone got it all._";
 
begintalknode 28;
 state = 7;
 nextstate = -1;
 question = "How's your inn?";
 text1 = "He pretends like he didn't hear the question. He must be one of those paranoid guys.";
 
begintalknode 29;
 state = -1;
 nextstate = -1;
 question = "Miner";
 text1 = "These two miners are apparently having a silent contest. When you try to talk, they glare at you.";
 
text2 = "At least, the implication of the fact that they don't want to talk to you is clear.";
 
begintalknode 30; state = 3; nextstate = -1; condition = (get_flag(0,22) == 6); question = "So, why did you have that orb?"; text1 = "The captain suddenly gets such an embaressed expresion on his face that you decide to leave him alone.";